פיתוח מערכות תוכנה מבוססות Java אוהד ברזילי
|
|
- Bertina Randall
- 5 years ago
- Views:
Transcription
1
2 מה בתוכנית? נדון בחלופות להשגת persistency בתוכנה: Relational DB and SQL JDBC persistence layer ORM
3 Persistency...ומה קורה אם באמצע התוכנית יש הפסקת חשמל? על רוב התוכניות להיות מסוגלות לשמור מידע בין ריצות Persistent Data Transient Data )מידע מתמשך( )מידע נדיף, ארעי( מה כל כך קשה בלשמור מידע? אנו יכולים לשמור את המידע לקובץ בעצמנו
4 Persistency Challenges System crashes What is the problem? Large data sets (say 50GB) What are the problems? Simultaneous access by many users Need locks: we know them from OS, but now data on disk; and is there any fun to re-implement them? Heterogeneous Clients Local and remote Different OS Different programming languages Complex data and complex operations
5 Transaction (ACID) Atomicity: guarantee that either all of the tasks of a transaction are performed or none of them are (COMMIT or ROLLBACK). Consistency: ensures that the database remains in a consistent state before the start of the transaction and after the transaction is over (whether successful or not). Isolation: no operation outside the transaction can ever see the data in an intermediate state. This enables transactions to operate independently of and transparent to each other. Durability: once the user has been notified of success, the transaction will persist, and not be undone. This means it will survive system failure, and that the database system has checked the integrity constraints and won't need to abort the transaction
6 What Is a Relational Database Management System? Database Management System = DBMS Relational DBMS = RDBMS A collection of files that store the data A big C program written by someone else that accesses and updates those files for you Where are RDBMS used? Backend for traditional database applications: CRM ERP Banking, insurance, Backend for large Websites Backend for Web services
7 Crash course on Relational Databases and SQL )עצם( =< כל דבר זה טבלה שדות של רשומה עמודות בטבלה :)schema( פעולות על מבנה הטבלאות CREATE, ALTER, DROP פעולות על תוכן הטבלאות: INSERT, SELECT, UPDATE, DELETE פעולות על כמה טבלאות: JOIN (INNER, LEFT, RIGHT) KEYS (PRIMARY, FOREIGN)
8 Primary Key of Order Table KEYS בעיה: המידע משוכפל שלא לצורך Primary Key of Customer Table Foreign Key in Order Table
9 How SELECT works People First_Name Last_Name Gender Age Phone John Smith M Sally Jones F John White M Mary Smith F SELECT First_Name, Last_Name FROM People WHERE Age > 30; Result: John White Mary Smith
10 אתגרי ה SQL יעילות שלמות המידע נורמליזציה של טבלאות עקביות, יתירות, נכונות, Behind the scenes the DBMS has: Query optimizer Query engine Storage management Transaction Management (concurrency, recovery) מדריכים מקוונים:
11 When RDBMS met Java
12 בעיה ראשונה SQL ו Java הן שפות שונות - איך מגשרים על הפער?
13 Java Database Connectivity (JDBC) An interface to communicate with a relational database Allows database agnostic Java code Treat database tables/rows/columns as Java objects JDBC driver An implementation of the JDBC interface Communicates with a particular database Java app JDBC calls JDBC JDBC driver driver Database commands Database Database
14 JDBC Driver Types Type 1: JDBC-ODBC Bridge Type 2: Native API / Partially Java Type 3: Pure Java / Net Protocol. Type 4: Pure Java / Native Protocol.
15 Embedding the DB - Java DB Java DB is Sun's supported distribution of the open source Apache Derby Included as part of Java SE v.6 Written in Java Transactional, secure, easy-to-use standards-based SQL, JDBC API, and Java EE Small footprint - only 2MB Community op/javadb/
16 Eclipse JDBC setup Install driver Download MySQL JDBC driver from the Web Unzip mysql-connector-xxx.jar Add mysql-connector-xxx.jar to Eclipse project Project Properties Java Build Path Libraries Add External JARs
17 JDBC steps 1. Connect to database 2. Query database (or insert/update/delete) 3. Process results 4. Close connection to database
18 import java.sql.*; public class Tester { public static void main(string[] args) { try { // Load JDBC driver Class.forName("com.mysql.jdbc.Driver").newInstance(); // Make connection String url = jdbc:mysql:// /grp?user=user&password=pass Connection conn = DriverManager.getConnection(url); // Create statement Statement stmt = conn.createstatement(); // Query database ResultSet rs = stmt.executequery("select * FROM users"); // Process results while (rs.next()) { <next slide...> } // Cleanup better put in finally clause rs.close(); stmt.close(); conn.close(); } } catch (Exception e) { System.out.println("exception " + e); }
19 Process Result ResultSet rs = stmt.executequery("select * FROM users"); while (rs.next()) { String userid = rs.getstring(1); String firstname = rs.getstring( firstname ); String lastname = rs.getstring( lastname ); String password = rs.getstring(4); int type = rs.getint( type ); System.out.println(userid + + firstname + + lastname + + password + + type); } users table userid firstname lastname password type Bob Bob King cat 0 John John Smith pass 1 Initial Cursor position Cursor after first call to rs.next()
20 JDBC 2.1 Updates, Queries, joins Transactions Prepared Statements Meta Data Callable Statements JDBC 3.0 Savepoints Pooling New Data Types RowSets JDBC Features JDBC 4.0 ease-of-use and programmer productivity SQL 2003 XML as a First-Class SQL Data Type
21 בעיה שנייה Paradigm Mismatch Problems caused when objects need to be stored in relational tables. Granularity Subtypes Identity Associations Graph Navigation Cost
22 Problem of Granularity Data types can have various kinds of granularity STREET is a field in CUSTOMER vs. STREET is a field in ADDRESS Performance vs. Modeling Poor support for user defined types (UDT) in SQL. No implementation is portable. Forces developers to use less flexible representations on the object model.
23 Problem of Subtypes Java objects implements inheritance (super & sub classes) Each sub or super class will define different data & completely different functionality. Polymorphism SQL provides no support for inheritance or polymorphism.
24 Problem of Identity Checking if objects are identical Java defines two notations: Object identity [==] Equality of value [.equals()] In SQL it is just checking if the two primary keys are the same Two or more objects can represent the same row of data SQL surrogate keys are not part of the model
25 Problem of Association Associations represent relation between entities Object references represents associations In SQL association is by foreign keys Object references are directional, foreign keys are not It isn t possible to determine multiplicity of a association just by looking at a class SQL multiplicity is always one-to-one or one-tomany, and can be determined by looking at the foreign key
26 Object Graph Navigation Difference in the way objects are accessed in Java and SQL obj.getdetails().getfirstfield() In SQL it would be a set of select statements with joins. n+1 select problem
27 Cost Of The Mismatch Requires significant time & effort Up to 30%* of code is devoted to handle tedious SQL/JDBC Difficulty in modeling the business entities Need to bridge Object/Relational mismatch * Java Persistence with Hibernate, Christian Bauer and Gavin King
28 ארכיטקטורה של המערכת בעיה 3 על פעולות רבות במערכת התוכנה להיות transactional ולכן חלקים רבים בקוד קוראים או כותבים ל Data Store שבירה של מודולריות שבירה של אבסטרקציה
29 Why relational DB survives? Relational technology is a known quantity, and this alone is sufficient reason for many organizations to choose it. (Java Persistence with Hibernate, Christian Bauer and Gavin King) Relational databases are entrenched because: they re an incredibly flexible and robust approach to data management. Due to the complete and consistent theoretical foundation of the relational data model, relational databases can effectively guarantee and protect the integrity of the data, among other desirable characteristics Data independence: data lives longer than any application does.
30 Layered Architecture A layered architecture defines interfaces between various concerns Layers communicate top to bottom A layer is dependent only on the layer directly below it
31 Implementing A Layered Architecture Hand-coding a persistence layer Using serialization Other technologies Object-oriented database systems XML Object/Relational Mapping framework Using EJB entity beans Hibernate
32 Hand-coding a persistence layer Typically using design patterns such as DAO patterns/patterns/dataaccessobject.html Involves manual coding of the persistence layer Hibernate is about 80,000 LOC + 25,000 lines of Unit test code
33 Using Serialization Used by RMI Data can only be accessed as a whole Serial access
34 Other leads Object-oriented database systems An object-oriented database management system (OODBMS) is more like an extension to the application environment than an external data store The Object Data Management Group (ODMG) is no longer active The Java Data Objects (JDO) specification (published in April 2002) XML persistence A variation on the serialization theme object/hierarchical mismatch
35 Object/Relational Mapping (ORM) Object/Relational Mapping is the automated (and transparent) persistence of objects in a Java application to the tables in a relational database, using metadata that describes the mapping between the objects and the database ORM, in essence, works by (reversibly) transforming data from one representation to another JavaObject int id; String name; String getname() int getid() void setname(string) void setid(int) SQL Table id [int] primary key, name [varchar(50)]
36 Using EJB 2.1 as ORM EJB 2.1 specification describes: bean-managed persistence (BMP) container-managed persistence (CMP) Deficiencies: CMP beans are defined in one-to-one correspondence to the tables of the relational model. Thus, they re too coarse grained On the other hand, CMP beans are also too fine grained to realize the stated goal of EJB: the definition of reusable software components. A reusable component should be a very coarse-grained object, with an external interface that is stable in the face of small changes to the database schema. Support only implementation inheritance, but don t support polymorphic associations and queries Entity beans aren t portable in practice. Capabilities of CMP engines vary widely between vendors, and the mapping metadata is highly vendor-specific Entity beans aren t serializable. We must define additional data transfer objects (DTOs, also called value objects) when we need to transport data to a remote client tier EJB is an intrusive model; it mandates an unnatural Java style and makes reuse of code outside a specific container extremely difficult
37 Hibernate Popular Open Source (LGPL) Object/Relational Mapping (ORM) tool Lightweight Non-intrusive Transparent persistence for POJOs (Plain Old Java Objects) Core of JBoss CMP 2.0 impl. Used as an inspiration for EJB 3.0 and JPA
38 A persistent class Event.java is a simple example for a class whose objects can be made persistent It needs An ID field A parameterless constructor...that's all!
39 package events; Event.java (1) import java.util.date; /** * This sample class uses Hibernate to make its state persistent. */ public class Event { // This id is unique system-wide. // Such unique ids are required by Hibernate for all persistent // classes. private Long id; private String title; private Date date; // A constructor without arguments is required by Hibernate // so that it can recreate this class using Reflection. // It should have package visibility "or greater". public Event() {}
40 Event.java (2) public Long getid() { return id; } private void setid(long id) { this.id = id; } public Date getdate() { return date; } public void setdate(date date) { this.date = date; } public String gettitle() { return title; } } public void settitle(string title) { this.title = title; }
41 Storing, Querying, Recalling EventManager.java shows how to do Transactions Queries We'll take a look at two methods, the simple createandstoreevents() and the more complex addpersontoevent()
42 Storing private Long createandstoreevent(string title, Date thedate) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.begintransaction(); Event theevent = new Event(); theevent.settitle(title); theevent.setdate(thedate); } session.save(theevent); session.gettransaction().commit(); return theevent.getid();
43 Querying... private void addpersontoevent(long personid, Long eventid) { Session session = HibernateUtil.getSessionFactory().getCurrentSession(); session.begintransaction(); Person aperson = (Person) session.createquery("select p from Person p left join fetch p.events where p.id = :pid").setparameter("pid", personid).uniqueresult(); Event anevent = (Event) session.load(event.class, eventid); session.gettransaction().commit(); // End of first unit of work
44 ...and Updating aperson.getevents().add(anevent); // aperson is detached // Begin second unit of work Session session2 = HibernateUtil.getSessionFactory().getCurrentSession(); session2.begintransaction(); session2.update(aperson); // Reattachment of aperson session2.gettransaction().commit(); }
45 מקורות JDO in Google App. Engine: JPA in Google App. Engine:
46 Persistency...ומה קורה אם פורצת שריפה?
Java Object/Relational Persistence with Hibernate. David Lucek 11 Jan 2005
Java Object/Relational Persistence with Hibernate David Lucek 11 Jan 2005 Object Relational Persistence Maps objects in your Model to a datastore, normally a relational database. Why? EJB Container Managed
More informationThe Object-Oriented Paradigm. Employee Application Object. The Reality of DBMS. Employee Database Table. From Database to Application.
The Object-Oriented Paradigm CS422 Principles of Database Systems Object-Relational Mapping (ORM) Chengyu Sun California State University, Los Angeles The world consists of objects So we use object-oriented
More informationObject-relational mapping EJB and Hibernate
T A R T U Ü L I K O O L MATEMAATIKA-INFORMAATIKATEADUSKOND Arvutiteaduse instituut Infotehnoloogia eriala Aleksandr Tkatšenko Object-relational mapping EJB and Hibernate Referaat aines Tarkvaratehnika
More informationobject/relational persistence What is persistence? 5
contents foreword to the revised edition xix foreword to the first edition xxi preface to the revised edition xxiii preface to the first edition xxv acknowledgments xxviii about this book xxix about the
More informationCSC System Development with Java. Database Connection. Department of Statistics and Computer Science. Budditha Hettige
CSC 308 2.0 System Development with Java Database Connection Budditha Hettige Department of Statistics and Computer Science Budditha Hettige 1 From database to Java There are many brands of database: Microsoft
More informationCSE 308. Database Issues. Goals. Separate the application code from the database
CSE 308 Database Issues The following databases are created with password as changeit anticyber cyber cedar dogwood elm clan Goals Separate the application code from the database Encourages you to think
More informationforeword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration
contents foreword to the first edition preface xxi acknowledgments xxiii about this book xxv about the cover illustration xix xxxii PART 1 GETTING STARTED WITH ORM...1 1 2 Understanding object/relational
More informationInternational Journal of Advance Research in Engineering, Science & Technology HIBERNATE FRAMEWORK FOR ENTERPRISE APPLICATION
Impact Factor (SJIF): 3.632 International Journal of Advance Research in Engineering, Science & Technology e-issn: 2393-9877, p-issn: 2394-2444 Volume 4, Issue 3, March-2017 HIBERNATE FRAMEWORK FOR ENTERPRISE
More informationIntroduction to Session beans. EJB - continued
Introduction to Session beans EJB - continued Local Interface /** * This is the HelloBean local interface. * * This interface is what local clients operate * on when they interact with EJB local objects.
More informationDatabase Programming Overview. COSC 304 Introduction to Database Systems. Database Programming. JDBC Interfaces. JDBC Overview
COSC 304 Introduction to Database Systems Database Programming Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca Database Programming Overview Most user interaction with
More informationJava Enterprise Edition
Java Enterprise Edition The Big Problem Enterprise Architecture: Critical, large-scale systems Performance Millions of requests per day Concurrency Thousands of users Transactions Large amounts of data
More informationEnterprise Java Unit 1- Chapter 6 Prof. Sujata Rizal
Introduction JDBC is a Java standard that provides the interface for connecting from Java to relational databases. The JDBC standard is defined by Sun Microsystems and implemented through the standard
More informationHibernate Overview. By Khader Shaik
Hibernate Overview By Khader Shaik 1 Agenda Introduction to ORM Overview of Hibernate Why Hibernate Anatomy of Example Overview of HQL Architecture Overview Comparison with ibatis and JPA 2 Introduction
More informationAnnouncements. SQL: Part IV. Transactions. Summary of SQL features covered so far. Fine prints. SQL transactions. Reading assignments for this week
Announcements 2 SQL: Part IV CPS 216 Advanced Database Systems Reading assignments for this week A Critique of ANSI SQL Isolation Levels, by Berenson et al. in SIGMOD 1995 Weaving Relations for Cache Performance,
More informationCOMP 430 Intro. to Database Systems. SQL from application code
COMP 430 Intro. to Database Systems SQL from application code Some issues How to connect to database Where, what type, user credentials, How to send SQL commands How to get communicate data to/from DB
More informationProgramming in Java
320341 Programming in Java Fall Semester 2014 Lecture 16: Introduction to Database Programming Instructor: Slides: Jürgen Schönwälder Bendick Mahleko Objectives This lecture introduces the following -
More informationLightweight J2EE Framework
Lightweight J2EE Framework Struts, spring, hibernate Software System Design Zhu Hongjun Session 4: Hibernate DAO Refresher in Enterprise Application Architectures Traditional Persistence and Hibernate
More informationTOPLink for WebLogic. Whitepaper. The Challenge: The Solution:
Whitepaper The Challenge: Enterprise JavaBeans (EJB) represents a new standard in enterprise computing: a component-based architecture for developing and deploying distributed object-oriented applications
More informationDatabases 2012 Embedded SQL
Databases 2012 Christian S. Jensen Computer Science, Aarhus University SQL is rarely written as ad-hoc queries using the generic SQL interface The typical scenario: client server database SQL is embedded
More informationScott Meder Senior Regional Sales Manager
www.raima.com Scott Meder Senior Regional Sales Manager scott.meder@raima.com Short Introduction to Raima What is Data Management What are your requirements? How do I make the right decision? - Architecture
More informationOutline. Lecture 10: Database Connectivity -JDBC. Java Persistence. Persistence via Database
Outline Lecture 10: Database Connectivity -JDBC Persistence via Database JDBC (Java Database Connectivity) JDBC API Wendy Liu CSC309F Fall 2007 1 2 Java Persistence Persistence via Database JDBC (Java
More informationIntroduction to JPA. Fabio Falcinelli
Introduction to JPA Fabio Falcinelli Me, myself and I Several years experience in active enterprise development I love to design and develop web and standalone applications using Python Java C JavaScript
More informationWentworth Institute of Technology COMP570 Database Applications Fall 2014 Derbinsky. SQL Programming. Lecture 8. SQL Programming
Lecture 8 1 Outline Context General Approaches Typical Programming Sequence Examples 2 Database Design and Implementation Process Normalization 3 SQL via API Embedded SQL SQLJ General Approaches DB Programming
More informationBUSINESS INTELLIGENCE LABORATORY. Data Access: Relational Data Bases. Business Informatics Degree
BUSINESS INTELLIGENCE LABORATORY Data Access: Relational Data Bases Business Informatics Degree RDBMS data access 2 Protocols and API ODBC, OLE DB, ADO, ADO.NET, JDBC JDBC Programming Java classes java.sql
More informationDatabase Application Architectures
Chapter 15 Database Application Architectures Database Systems(Part 2) p. 221/287 Database Applications Most users do not interact directly with a database system The DBMS is hidden behind application
More informationFast Track to EJB 3.0 and the JPA Using JBoss
Fast Track to EJB 3.0 and the JPA Using JBoss The Enterprise JavaBeans 3.0 specification is a deep overhaul of the EJB specification that is intended to improve the EJB architecture by reducing its complexity
More informationDatabase Application Development
CS 461: Database Systems Database Application Development supplementary material: Database Management Systems Sec. 6.2, 6.3 DBUtils.java, Student.java, Registrar.java, RegistrarServlet.java, PgRegistrar.sql
More informationChapter 6 Object Persistence, Relationships and Queries
Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 6 Object Persistence, Relationships and Queries Object Persistence
More informationJava and the Java DataBase Connectivity (JDBC) API. Todd Kaufman April 25, 2002
Java and the Java DataBase Connectivity (JDBC) API Todd Kaufman April 25, 2002 Agenda BIO Java JDBC References Q&A Speaker 4 years Java experience 4 years JDBC experience 3 years J2EE experience BS from
More informationWhy use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge
175 Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge numbers of records without the risk of corruption
More informationYou write standard JDBC API application and plug in the appropriate JDBC driver for the database the you want to use. Java applet, app or servlets
JDBC Stands for Java Database Connectivity, is an API specification that defines the following: 1. How to interact with database/data-source from Java applets, apps, servlets 2. How to use JDBC drivers
More informationSupports 1-1, 1-many, and many to many relationships between objects
Author: Bill Ennis TOPLink provides container-managed persistence for BEA Weblogic. It has been available for Weblogic's application server since Weblogic version 4.5.1 released in December, 1999. TOPLink
More informationWhat is Transaction? Why Transaction Management Required? JDBC Transaction Management in Java with Example. JDBC Transaction Management Example
JDBC Transaction Management in Java with Example Here you will learn to implement JDBC transaction management in java. By default database is in auto commit mode. That means for any insert, update or delete
More informationChapter 6 Object Persistence, Relationships and Queries
Prof. Dr.-Ing. Stefan Deßloch AG Heterogene Informationssysteme Geb. 36, Raum 329 Tel. 0631/205 3275 dessloch@informatik.uni-kl.de Chapter 6 Object Persistence, Relationships and Queries Object Persistence
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 6 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2411 1 We
More informationLecture 9&10 JDBC. Mechanism. Some Warnings. Notes. Style. Introductory Databases SSC Introduction to DataBases 1.
Lecture 9&10 JDBC Java and SQL Basics Data Manipulation How to do it patterns etc. Transactions Summary JDBC provides A mechanism for to database systems An API for: Managing this Sending s to the DB Receiving
More informationObject-Relational Mapping
Object-Relational Mapping Object-Relational Mapping Software Architecture ORM Problems ORM Solutions Demo Software Architecture Part 1 Architecture Separation of Concerns A design principle that comprises
More informationSUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :
SUN 310-052 Sun Certified Enterprise Architect for J2EE 5 Download Full Version : http://killexams.com/pass4sure/exam-detail/310-052 combination of ANSI SQL-99 syntax coupled with some company-specific
More informationJAVA COURSES. Empowering Innovation. DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP
2013 Empowering Innovation DN InfoTech Pvt. Ltd. H-151, Sector 63, Noida, UP contact@dninfotech.com www.dninfotech.com 1 JAVA 500: Core JAVA Java Programming Overview Applications Compiler Class Libraries
More informationEfficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB. Marc Stampfli Oracle Software (Switzerland) Ltd.
Efficient Object-Relational Mapping for JAVA and J2EE Applications or the impact of J2EE on RDB Marc Stampfli Oracle Software (Switzerland) Ltd. Underestimation According to customers about 20-50% percent
More informationMigrating traditional Java EE applications to mobile
Migrating traditional Java EE applications to mobile Serge Pagop Sr. Channel MW Solution Architect, Red Hat spagop@redhat.com Burr Sutter Product Management Director, Red Hat bsutter@redhat.com 2014-04-16
More informationJDBC, Transactions. Niklas Fors JDBC 1 / 38
JDBC, Transactions SQL in Programs Embedded SQL and Dynamic SQL JDBC Drivers, Connections, Statements, Prepared Statements Updates, Queries, Result Sets Transactions Niklas Fors (niklas.fors@cs.lth.se)
More informationERwin and JDBC. Mar. 6, 2007 Myoung Ho Kim
ERwin and JDBC Mar. 6, 2007 Myoung Ho Kim ERwin ERwin a popular commercial ER modeling tool» other tools: Dia (open source), Visio, ConceptDraw, etc. supports database schema generation 2 ERwin UI 3 Data
More informationTable of Contents. I. Pre-Requisites A. Audience B. Pre-Requisites. II. Introduction A. The Problem B. Overview C. History
Table of Contents I. Pre-Requisites A. Audience B. Pre-Requisites II. Introduction A. The Problem B. Overview C. History II. JPA A. Introduction B. ORM Frameworks C. Dealing with JPA D. Conclusion III.
More informationAccessing databases in Java using JDBC
Accessing databases in Java using JDBC Introduction JDBC is an API for Java that allows working with relational databases. JDBC offers the possibility to use SQL statements for DDL and DML statements.
More informationCOMP9321 Web Application Engineering
COMP9321 Web Application Engineering Data Access in Web Applications Dr. Basem Suleiman Service Oriented Computing Group, CSE, UNSW Australia Semester 1, 2016, Week 5 http://webapps.cse.unsw.edu.au/webcms2/course/index.php?cid=2442
More informationCSE 135. Three-Tier Architecture. Applications Utilizing Databases. Browser. App. Server. Database. Server
CSE 135 Applications Utilizing Databases Three-Tier Architecture Located @ Any PC HTTP Requests Browser HTML Located @ Server 2 App Server JDBC Requests JSPs Tuples Located @ Server 1 Database Server 2
More informationUNIT III - JDBC Two Marks
UNIT III - JDBC Two Marks 1.What is JDBC? JDBC stands for Java Database Connectivity, which is a standard Java API for databaseindependent connectivity between the Java programming language and a wide
More informationAppendix A - Glossary(of OO software term s)
Appendix A - Glossary(of OO software term s) Abstract Class A class that does not supply an implementation for its entire interface, and so consequently, cannot be instantiated. ActiveX Microsoft s component
More informationTopics in Enterprise Information Management
Topics in Enterprise Information Management Dr. Ilan Kirsh JPA Basics Object Database and ORM Standards and Products ODMG 1.0, 2.0, 3.0 TopLink, CocoBase, Castor, Hibernate,... EJB 1.0, EJB 2.0: Entity
More informationSpring & Hibernate. Knowledge of database. And basic Knowledge of web application development. Module 1: Spring Basics
Spring & Hibernate Overview: The spring framework is an application framework that provides a lightweight container that supports the creation of simple-to-complex components in a non-invasive fashion.
More informationObject Persistence and Object-Relational Mapping. James Brucker
Object Persistence and Object-Relational Mapping James Brucker Goal Applications need to save data to persistent storage. Persistent storage can be database, directory service, XML files, spreadsheet,...
More informationJDBC 3.0. Java Database Connectivity. 1 Java
JDBC 3.0 Database Connectivity 1 Contents 1 JDBC API 2 JDBC Architecture 3 Steps to code 4 Code 5 How to configure the DSN for ODBC Driver for MS-Access 6 Driver Types 7 JDBC-ODBC Bridge 8 Disadvantages
More informationJava EE Architecture, Part Three. Java EE architecture, part three 1(57)
Java EE Architecture, Part Three Java EE architecture, part three 1(57) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE
More informationDatabase Access. Rick Cattell JavaSoft
Database Access Rick Cattell JavaSoft Database Access 1. Relational database connectivity: JDBC 2. Higher-level relational APIs and tools 3. Object-oriented databases 4. Partners and summary Overview Java
More informationJava EE Architecture, Part Three. Java EE architecture, part three 1(69)
Java EE Architecture, Part Three Java EE architecture, part three 1(69) Content Requirements on the Integration layer The Database Access Object, DAO Pattern Frameworks for the Integration layer Java EE
More informationJDBC Architecture. JDBC API: This provides the application-to- JDBC Manager connection.
JDBC PROGRAMMING JDBC JDBC Java DataBase Connectivity Useful for database driven applications Standard API for accessing relational databases Compatible with wide range of databases Current Version JDBC
More informationThis tutorial is going to guide you throughout the setup of your. workspace. First, we re going to see how to install the MySQL RDBMS
Installing MySQL This tutorial is going to guide you throughout the setup of your workspace. First, we re going to see how to install the MySQL RDBMS in your preferred OS. This is going to be the only
More informationHIBERNATE MOCK TEST HIBERNATE MOCK TEST IV
http://www.tutorialspoint.com HIBERNATE MOCK TEST Copyright tutorialspoint.com This section presents you various set of Mock Tests related to Hibernate Framework. You can download these sample mock tests
More informationEntities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics:
Entities are classes that need to be persisted, usually in a relational database. In this chapter we cover the following topics: EJB 3 entities Java persistence API Mapping an entity to a database table
More informationPro JPA 2. Mastering the Java Persistence API. Apress* Mike Keith and Merrick Schnicariol
Pro JPA 2 Mastering the Java Persistence API Mike Keith and Merrick Schnicariol Apress* Gootents at a Glance g V Contents... ; v Foreword _ ^ Afooyt the Author XXj About the Technical Reviewer.. *....
More informationCSCD43: Database Systems Technology. Lecture 4
CSCD43: Database Systems Technology Lecture 4 Wael Aboulsaadat Acknowledgment: these slides are based on Prof. Garcia-Molina & Prof. Ullman slides accompanying the course s textbook. Steps in Database
More informationSQL: Programming Midterm in class next Thursday (October 5)
Announcements (September 28) 2 Homework #1 graded Homework #2 due today Solution available this weekend SQL: Programming Midterm in class next Thursday (October 5) Open book, open notes Format similar
More informationHibernate in close action. INF5750/ Lecture 3 (Part III)
Hibernate in close action INF5750/9750 - Lecture 3 (Part III) Recalling Hibernate from Lect 2 Hibernate is an ORM tool? Hibernate can communication with different DBMS through? (mentioned in hibernate.properties)
More informationTable of Contents EJB 3.1 and JPA 2
Table of Contents EJB 3.1 and JPA 2 Enterprise JavaBeans and the Java Persistence API 1 Workshop Overview 2 Workshop Objectives 3 Workshop Agenda 4 Course Prerequisites 5 Labs 6 Session 1: Introduction
More information5. Distributed Transactions. Distributed Systems Prof. Dr. Alexander Schill
5. Distributed Transactions Distributed Systems http://www.rn.inf.tu-dresden.de Outline Transactions Fundamental Concepts Remote Database Access Distributed Transactions Transaction Monitor Folie 2 Transactions:
More informationModule 8 The Java Persistence API
Module 8 The Java Persistence API Objectives Describe the role of the Java Persistence API (JPA) in a Java EE application Describe the basics of Object Relational Mapping Describe the elements and environment
More informationDATABASES SQL INFOTEK SOLUTIONS TEAM
DATABASES SQL INFOTEK SOLUTIONS TEAM TRAINING@INFOTEK-SOLUTIONS.COM Databases 1. Introduction in databases 2. Relational databases (SQL databases) 3. Database management system (DBMS) 4. Database design
More informationindx.qxd 11/3/04 3:34 PM Page 339 Index
indx.qxd 11/3/04 3:34 PM Page 339 Index *.hbm.xml files, 30, 86 @ tags (XDoclet), 77 86 A Access attributes, 145 155, 157 165, 171 ACID (atomic, consistent, independent, and durable), 271 AddClass() method,
More information2005, Cornell University
Rapid Application Development using the Kuali Architecture (Struts, Spring and OJB) A Case Study Bryan Hutchinson bh79@cornell.edu Agenda Kuali Application Architecture CATS Case Study CATS Demo CATS Source
More informationIntroduction. Example Databases
Introduction Example databases Overview of concepts Why use database systems Example Databases University Data: departments, students, exams, rooms,... Usage: creating exam plans, enter exam results, create
More informationWorking with Databases and Java
Working with Databases and Java Pedro Contreras Department of Computer Science Royal Holloway, University of London January 30, 2008 Outline Introduction to relational databases Introduction to Structured
More informationHibernate Interview Questions
Hibernate Interview Questions 1. What is Hibernate? Hibernate is a powerful, high performance object/relational persistence and query service. This lets the users to develop persistent classes following
More informationDatabase Application Development
Database Application Development Linda Wu (CMPT 354 2004-2) Topics SQL in application code Embedded SQL JDBC SQLJ Stored procedures Chapter 6 CMPT 354 2004-2 2 SQL in Application Code SQL commands can
More information1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master
Oracle 1Z0-864 Java Enterprise Edition 5 Enterprise Architect Certified Master Download Full Version : http://killexams.com/pass4sure/exam-detail/1z0-864 Answer: A, C QUESTION: 226 Your company is bidding
More informationErik Dörnenburg JAOO 2003
Persistence Neutrality using the Enterprise Object Broker application service framework Erik Dörnenburg JAOO 2003 Sample project Simple application Heavy client One business entity Basic operations Person
More informationSQL in a Server Environment
SQL in a Server Environment Vaidė Narváez Computer Information Systems January 13th, 2011 The Three-Tier Architecture Application logic components Copyright c 2009 Pearson Education, Inc. Publishing as
More information1Z0-804 Q&As. Java SE 7 Programmer II Exam. Pass Oracle 1Z0-804 Exam with 100% Guarantee
1Z0-804 Q&As Java SE 7 Programmer II Exam Pass Oracle 1Z0-804 Exam with 100% Guarantee Free Download Real Questions & Answers PDF and VCE file from: 100% Passing Guarantee 100% Money Back Assurance Following
More informationpurequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc.
purequery Deep Dive Part 2: Data Access Development Dan Galvin Galvin Consulting, Inc. Agenda The Problem Data Access in Java What is purequery? How Could purequery Help within My Data Access Architecture?
More informationSNS COLLEGE OF ENGINEERING, Coimbatore
SNS COLLEGE OF ENGINEERING, Coimbatore 641 107 Accredited by NAAC UGC with A Grade Approved by AICTE and Affiliated to Anna University, Chennai IT6503 WEB PROGRAMMING UNIT 03 JDBC JDBC Overview JDBC implementation
More informationJava Training Center, Noida - Java Expert Program
Java Training Center, Noida - Java Expert Program Database Concepts Introduction to Database Limitation of File system Introduction to RDBMS Steps to install MySQL and oracle 10g in windows OS SQL (Structured
More informationHibernate Search Googling your persistence domain model. Emmanuel Bernard Doer JBoss, a division of Red Hat
Hibernate Search Googling your persistence domain model Emmanuel Bernard Doer JBoss, a division of Red Hat Search: left over of today s applications Add search dimension to the domain model Frankly, search
More informationEJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java
EJB Enterprise Java EJB Beans ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY Peter R. Egli 1/23 Contents 1. What is a bean? 2. Why EJB? 3. Evolution
More informationDatabases. Jörg Endrullis. VU University Amsterdam
Databases Jörg Endrullis VU University Amsterdam Databases A database (DB) is a collection of data with a certain logical structure a specific semantics a specific group of users Databases A database (DB)
More informationJDBC Drivers Type. JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server.
JDBC Drivers Type 1 What is JDBC Driver? JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server. For example, using JDBC drivers enable you to open database
More informationWeb Application Development Using JEE, Enterprise JavaBeans and JPA
Web Application Development Using JEE, Enterprise Java and JPA Duration: 35 hours Price: $750 Delivery Option: Attend training via an on-demand, self-paced platform paired with personal instructor facilitation.
More information/ / JAVA TRAINING
www.tekclasses.com +91-8970005497/+91-7411642061 info@tekclasses.com / contact@tekclasses.com JAVA TRAINING If you are looking for JAVA Training, then Tek Classes is the right place to get the knowledge.
More informationPERSİSTENCE OBJECT RELATİON MAPPİNG
PERSİSTENCE Most of the applications require storing and retrieving objects in a persistent storage mechanism. This chapter introduces how to store and retrieve information in a persistent storage with
More informationJPA Entities. Course Multi Tier Business Applications with Java EE. Prof. Dr. Eric Dubuis Berner Fachhochschule Biel. Berner Fachhochschule
Berner Fachhochschule Technik und Informatik JPA Entities Course Multi Tier Business Applications with Java EE Prof. Dr. Eric Dubuis Berner Fachhochschule Biel Content Characteristics of entities Programming
More informationUnit 6 Hibernate. List the advantages of hibernate over JDBC
Q1. What is Hibernate? List the advantages of hibernate over JDBC. Ans. Hibernate is used convert object data in JAVA to relational database tables. It is an open source Object-Relational Mapping (ORM)
More informationMappings and Queries. with. Hibernate
Mappings and Queries with Hibernate Mappings Collection mapping Mapping collection of values e.g. holidays, months Association mapping Mapping of relationships between two objects e.g. Account and AccountOwner
More informationWeb Application Development Using JEE, Enterprise JavaBeans and JPA
Web Application Development Using JEE, Enterprise Java and JPA Duration: 5 days Price: $2795 *California residents and government employees call for pricing. Discounts: We offer multiple discount options.
More informationWhat data persistence means? We manipulate data (represented as object state) that need to be stored
1 Data Persistence What data persistence means? We manipulate data (represented as object state) that need to be stored persistently to survive a single run of the application queriably to be able to retrieve/access
More informationOverview. Database Application Development. SQL in Application Code. SQL in Application Code (cont.)
Overview Database Application Development Chapter 6 Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures Database Management Systems 3ed
More informationDatabase Application Development
Database Application Development Chapter 6 Database Management Systems 3ed 1 Overview Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures
More informationDatabase Application Development
Database Application Development Chapter 6 Database Management Systems 3ed 1 Overview Concepts covered in this lecture: SQL in application code Embedded SQL Cursors Dynamic SQL JDBC SQLJ Stored procedures
More informationQuestions and Answers. A. A DataSource is the basic service for managing a set of JDBC drivers.
Q.1) What is, in terms of JDBC, a DataSource? A. A DataSource is the basic service for managing a set of JDBC drivers B. A DataSource is the Java representation of a physical data source C. A DataSource
More informationSQL: Programming. Announcements (September 25) Motivation. CPS 116 Introduction to Database Systems. Pros and cons of SQL.
SQL: Programming CPS 116 Introduction to Database Systems Announcements (September 25) 2 Homework #2 due this Thursday Submit to Yi not through Jun s office door Solution available this weekend No class
More informationJPA The New Enterprise Persistence Standard
JPA The New Enterprise Persistence Standard Mike Keith michael.keith@oracle.com http://otn.oracle.com/ejb3 About Me Co-spec Lead of EJB 3.0 (JSR 220) Java EE 5 (JSR 244) expert group member Co-author Pro
More informationIntroduction JDBC 4.1. Bok, Jong Soon
Introduction JDBC 4.1 Bok, Jong Soon javaexpert@nate.com www.javaexpert.co.kr What is the JDBC TM Stands for Java TM Database Connectivity. Is an API (included in both J2SE and J2EE releases) Provides
More information